<form class="layui-form seller-form"  action="" >
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">手机号码：</label>
            <div class="layui-input-inline seller-inline-3">
                <input type="text" name="mobile" lay-verify="title" placeholder="请输入手机号码" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">类型：</label>
            <div class="layui-input-inline seller-inline-2" >
                <select name="type" lay-verify="">
                    <option value=""></option>
                    <option value="1">消费</option>
                    <option value="2">清算</option>
                    <option value="3">退款</option>
                    <option value="4">清算退款</option>
                    <option value="5">充值</option>
                    <option value="6">提现</option>
                </select>
            </div>
        </div>

        <div class="layui-inline">
	        <div class="layui-input-block">
	            <button class="layui-btn layui-btn-sm" lay-submit lay-filter="*"><i class="iconfont icon-chaxun"></i>筛选</button>
	        </div>
        </div>
    </div>
</form>

<div class="table-body">
    <table id="balanceTable" lay-filter="balanceTable"></table>
</div>

<script>
    layui.use(['form', 'layedit', 'laydate','table'], function(){
        layui.table.render({
            elem: '#balanceTable',
            height: 'full-330',
            cellMinWidth: '80',
            page: 'true',
            limit:'20',
            url: "{:url('balance/index')}?_ajax=1",
            id:'balanceTable',
            cols: [[
                {type:'numbers'},
                {field: 'mobile',width:140, title: '用户', align: 'center',templet:function(data){
                    var html = '';
                    html += data.mobile;
                    return html;
                }},
                {field:'type', width:120,title:'类型'},
                {field:'money', width:160,title:'金额'},
                {field:'balance', width:160,title:'余额'},
                {field:'memo',title:'描述'},
                {field:'ctime',width:200,title:'时间'}
            ]]
        });
        layui.form.on('submit(*)', function(data){
            layui.table.reload('balanceTable', {
                where: data.field
                ,page: {
                    curr: 1 //重新从第 1 页开始
                }
            });
            return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
        });
    });
</script>
